#include <stdio.h>
#include "calculate.h"

const char *const main_print_format = "[main] a=%lf,b=%lf,op=%c\n";

static struct StructTestInMain {
public:
    int i = 1;
    char *x = (char *) main_print_format;
};

static StructTestInMain struct_test_in_main = {2, (char*) main_print_format};

int main(int argc, char const *argv[]) {
    struct_test_in_main.i = argc;
    printf("struct_test_in_main i=%d,str=%s\n\n", struct_test_in_main.i, struct_test_in_main.x);

    printf("add=%lf\n", calculate(1, 2, '+'));
    printf("sub=%lf\n", calculate(1, 2, '-'));
    return 0;
}
